{template:header}
{template:usercp_menu}
<div id="ucp_content">
	<h3>{$lang['pmtrack']}</h3>
	<form action="private.php" name='trackread' method="post">
	<input type='hidden' name='s' value='{sessionid}' />
	<input type='hidden' name='do' value='endtracking' />
	<em>{$lang['pmhasread']}</em>
	<p>{$lang['pmhasreaddesc']}</p>
	<div class='ucp'>
		<table width='100%' cellspacing='1' cellpadding='0' class="ttable">
		<thead>
			<tr class="thead" align="left">
				<th>&nbsp;</th>
				<th width='60%'>{$lang['pmtitle']}</th>
				<th width='15%'>{$lang['sendto']}</th>
				<th width='20%'>{$lang['readtime']}</th>
				<th width='5%'><input name="allbox" type="checkbox" value="{$lang['_selectall']}" onclick="CheckAll(document.trackread);" /></th>
			</tr>
		</thead>
		<tbody class="tbody">
		<if="$show['read']">
			<foreach="$read AS $data">
			<tr align="left" class="item_list" onmouseover="this.className='item_change';" onmouseout="this.className='item_list';">
				<td align="center"><img src='images/<#IMAGE#>/pm_old.gif' alt='{$lang['pmhasread']}' /></td>
				<td>{$data['title']}</td>
				<td><a href='profile.php{sessionurl}u={$data['userid']}'>{$data['to_name']}</a></td>
				<td class="time">{$data['date']}</td>
				<td align="center"><input type='checkbox' name='pmid[]' value='{$data['pmid']}' /></td>
			</tr>
			</foreach>
		<else>
			<tr class="item_list" align='center'>
				<td colspan='5'>{$lang['notrackpms']}</td>
			</tr>
		</if>
			<tr>
				<td align='right' class='item_change' colspan='5'>
					<input type='submit' value='{$lang['endtrack']}' class='button_normal' />
				</td>
			</tr>
		</tbody>
		</table>
	</div>
	</form>

	<form action="private.php" name='trackunread' method="post">
	<input type='hidden' name='s' value='{sessionid}' />
	<input type='hidden' name='do' value='deltracked' />
	<em>{$lang['pmunread']}</em>
	<p>{$lang['pmunreaddesc']}</p>
	<div class='ucp'>
		<table width='100%' cellspacing='1' cellpadding='0' class="ttable">
		<thead>
			<tr class="thead" align="left">
				<th>&nbsp;</th>
				<th width='60%'>{$lang['pmtitle']}</th>
				<th width='15%'>{$lang['sendto']}</th>
				<th width='20%'>{$lang['sendtime']}</th>
				<th width='5%'><input name="allbox" type="checkbox" value="{$lang['_selectall']}" onclick="CheckAll(document.trackunread);" /></th>
			</tr>
		</thead>
		<tbody class="tbody">
		<if="$show['unread']">
			<foreach="$unread AS $data">
			<tr align="left" class="item_list" onmouseover="this.className='item_change';" onmouseout="this.className='item_list';">
				<td align="center"><img src='images/<#IMAGE#>/pm_new.gif' alt='{$lang['pmunread']}' /></td>
				<td>{$data['title']}</td>
				<td><a href='profile.php{sessionurl}u={$data['userid']}'>{$data['to_name']}</a></td>
				<td class="time">{$data['date']}</td>
				<td align="center"><input type='checkbox' name='pmid[]' value='{$data['pmid']}' /></td>
			</tr>
			</foreach>
		<else>
			<tr class="item_list" align='center'>
				<td colspan='5'>{$lang['notrackpms']}</td>
			</tr>
		</if>
			<tr>
				<td align='right' class='item_change' colspan='5'>
					<input type='submit' value='{$lang['_delete']}' class='button_normal' />
				</td>
			</tr>
		</tbody>
		</table>
	</div>
	</form>
</div>
{template:footer}